<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>InkType : Install</title>
        <link href="<?=$this->css_dir;?>admin/css/styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="login">
        <div id="wrapper">
            <!-- Header -->
            <div id="header">
                <div class="logo"> <img src="<?=$this->css_dir;?>admin/images/logo.png" width="283" height="135" alt="Admin CMS" /> </div>
            </div>
            <!-- Header -->
            <div style="clear:both"></div>
            <!--  Content -->
            <div id="middlepart">
                <!--  Login Box -->
                <div id="login">

                    <h1>Inktype Installer</h1>

                    <?if ($database_exists AND !$admin_exists and !$site_exists) {?>

                        <?=$this->validation->error_string;?>

                        <?=form_open($this->uri->uri_string(), array('class'=>'loginform', 'name'=>'admin_install_form'));?>

                    <h4>Admin Account</h4>

                    <p>Enter the following details to create your administrator account.</p>

                    <label>Email Address</label><br />
                    <span style="font-size: 80%;">You will log in using this email address</span>
                    <input type="text" name="email_address" size="40" value="<?=$this->validation->email_address;?>" />
                    <br />
                    <label>Display Name</label><br />
                    <span style="font-size: 80%;">Your display name will display in your posts</span>
                    <input type="text" name="display_name" size="40" value="<?=$this->validation->display_name;?>" />
                    <br />
                    <label>Password</label>
                    <input type="password" name="password" value="" size="40" />
                    <br />
                    <label>Password Verification</label>
                    <input type="password" name="passwordv" value="" size="40" />

                    <h4>Site Settings</h4>

                    <p>Enter the following details to initialize your default site.</p>

                    <label>Site Name</label><br />
                    <input type="text" name="site_name" size="40" value="<?=$this->validation->site_name;?>"><br />

                    <label>Site Description</label><br />
                    <input type="text" name="site_description" size="40" value="<?=$this->validation->site_description;?>"><br />

                    <p> <a class="submit" href="#" onclick="document.admin_install_form.submit();">Create</a> </p><br />

                    </form>

                    <?} elseif ($admin_exists) {?>

                    <h4>Admin Account Already Exists</h4>

                    <p>You may not use the admin account installation utility.</p>

                    <?} elseif (!$$database_exists) {?>

                    <h4>Database Not Set Up	</h4>

                    <p>You must import the InkType SQL file to create the database tables before you can continue.</p>

                    <?} elseif ($site_exists) {?>

                    <h4>Site Already Exists</h4>

                    <p>You may not use the admin account installation utility.</p>

                    <?}?>

                </div>
                <!--  LoginBox End -->
            </div>
            <!--  Content End -->
        </div>
        <!--  Wrapper End -->
    </body>
</html>